import { EventEmitter,Injectable } from '@angular/core';
import { BaseService } from '../shared/base.service';
import { Http } from '@angular/http';
import SysData from '../shared/sysData';
import { TranslateService } from "@ngx-translate/core";
import { NonNullAssert } from '@angular/compiler';
@Injectable({
  providedIn: 'root'
})
export class HomeService extends BaseService  {
    public activeStoreEmit0;
    public activeStoreEmit1;
    public activeStoreEmit2;
    constructor(http:Http,translateService:TranslateService) {
        super(http,translateService);
    this.activeStoreEmit0=new EventEmitter();
    this.activeStoreEmit1=new EventEmitter();
    this.activeStoreEmit2=new EventEmitter();
  }
    //获得字典
    getTree(){
        return this.postInfo("/eas-alone/urAA10/getTree",null);
    }
    //websocket地址获取
    getWebsocket(data){
        return this.postInfo("/eas-alone/v1/device/getWebsocket",data);
    }
    //主副天线切换
    chgAntType(data){
        return this.postInfo("/eas-alone/v1/device/chgAntType",data);
    }
    //下发命令
    order(data){
        return this.postInfo("/eas-alone/v1/device/order",data);
    }
    //波形图启/停
    chgWaveform(data){
        return this.postInfo("/eas-alone/v1/device/chgWaveform",data);
    }
    //退出登陆
    logOut(){
        return this.postInfo("/eas-alone/v1/device/loginOut",null);
    }
}
